﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SalesPriceGroup.aspx.cs" Inherits="Main_Master_SalesPriceGroup" EnableEventValidation="false" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<%@ Register Src="~/User Controls/CommonControls.ascx" TagName="CommonControls" TagPrefix="MyControls" %>
<%@ Register Src="~/User Controls/Pager.ascx" TagPrefix="custom" TagName="Pager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Sales Price Group</title>
      <link rel="Stylesheet" href="../../Styles/accounts.css" type="text/css" />

</head>
<body>
    <form id="form1" runat="server">
    <div>
      <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>
         <div class="divmain" > <acc:heading ID="pagehead" runat="server" HeadingText="Sales Price" /> </div>    
            <div style="width:90%; margin-left:5%; margin-right:5%;">        
               <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <Triggers> <asp:PostBackTrigger ControlID="controls" /> </Triggers> 
                        <ContentTemplate> 
                                <div style="margin-left:5%; margin-right:5%; width:90%" align="center"><asp:Label ID="lblMsg" runat="server" Font-Bold="true"></asp:Label></div> 
                                    <asp:UpdateProgress DynamicLayout="false" ID="UpdProgress" runat="server">
                                        <ProgressTemplate> <div align="center"><img src="../../Images/ajax-loader.gif" /></div> </ProgressTemplate>
                                    </asp:UpdateProgress>
                                        <asp:HiddenField ID="HidControl" runat="server" /> 
                                       
                                         <table class="tablecontent" style="width:40%; " align="center">
                                                <tr> 
                                                    <td> Name</td>
                                                    <td> <asp:TextBox ID="TxtName" runat="server" CssClass="input"></asp:TextBox>
                                                         <asp:RequiredFieldValidator ID="RFVTxtName" runat="server" ControlToValidate="TxtName" ErrorMessage="*"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                
                                                <tr>
                                                    <td> Discount </td>
                                                    <td> <asp:TextBox ID="TxtDiscount" runat="server" Text="0.00" CssClass="inputnumber"></asp:TextBox>
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"  ControlToValidate="TxtDiscount" ErrorMessage="*"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                
                                                <tr>
                                                    <td></td>
                                                    <td align="left"><asp:Button ID="BtnSave" runat="server" CssClass ="button" Text="Save" 
                                                            onclick="BtnSave_Click" />&nbsp;<asp:Button ID="BtnUpdate" runat="server" Text="Update" 
                                                            CssClass="button" onclick="BtnUpdate_Click" />
                                                            &nbsp;<asp:Button ID="Btnclose" runat="server" ValidationGroup="false" CssClass="button" Text="Close" onclick="Btnclose_Click" /> </td>
                                                </tr>
                                         </table>
                                         
                                            <div style="margin-left:15%;">
                                       <div style=" padding-top:15px;  margin-left:30%;">  
                                           <div style="float:left;"><custom:pager ID="custPager" runat="server" OnPageChanged="custPager_PageChanged" /></div>
                                           <div style="float:left; margin-left:10px;"> 
                                               <mycontrols:commoncontrols ID="controls" runat="server" 
                                                   GridviewControlId="GrdLocation" HideColumns="3" /> </div>
                                       </div> 
                                       
                                        <div id="divprint" runat="server">
                                            <asp:GridView ID="GrdLocation" Width="80%" runat="server" CssClass="gridview" AlternatingRowStyle-CssClass="gridview_alternate"
                                                AutoGenerateColumns="false" RowStyle-CssClass="gridviewitem" PageSize="5" 
                                                AllowPaging="true" PagerStyle-CssClass="pgr"
                                                EmptyDataRowStyle-CssClass="emptyrow" DataKeyNames="SPGID"
                                                onselectedindexchanged="GrdLocation_SelectedIndexChanged" 
                                                onpageindexchanging="GrdLocation_PageIndexChanging" 
                                                onrowcreated="GrdLocation_RowCreated" >
                                                
                                                <Columns>
                                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="S.No.">
                                                        <ItemTemplate><%#Container.DataItemIndex+1%></ItemTemplate>
                                                   </asp:TemplateField>
                                                    <asp:BoundField HeaderText="Name" DataField="SPGNAME" ItemStyle-Width="20%" />
                                                    <asp:BoundField HeaderText="Discount" DataField="DISCOUNTPER" ItemStyle-Width="40%"  />
                                                    <asp:CommandField HeaderText="Edit" SelectText="<img src='../../Menu/images/Edit_user.png' alt='Edit'>" ShowSelectButton="true" />         

                                               </Columns>
                                                    <PagerStyle HorizontalAlign="Right" />
                                            </asp:GridView>
                                        </div>
                                      </div>
                                      
                             </ContentTemplate>
                      </asp:UpdatePanel>
                </div>
                  
    </div>
    </form>
</body>
</html>
